var mySwiper = new Swiper('.swiper', {
  direction: 'horizontal', // 垂直切换选项
  loop: true, // 循环模式选项
  effect: 'cube',//设置切换效果
  // 如果需要分页器
  pagination: {
    el: '.swiper-pagination',
  },

  // 如果需要前进后退按钮
  navigation: {
    nextEl: '.swiper-button-next',
    prevEl: '.swiper-button-prev',
  },
  // autoplay: {
  //     delay: 1500,
  //     stopOnLastSlide: false,
  //     disableOnInteraction: true,
  //     },
  // 如果需要滚动条
  // scrollbar: {
  //   el: '.swiper-scrollbar',
  // },
})

import {
  getImg
  // 剩下的请求方法记得用逗号分隔
} from "./request.js"
let haha = document.querySelectorAll(".haha")
console.log(haha)
getImg().then(res => {
  console.log(res.data.rows[0].Carousels);
  let urls = res.data.rows[0].Carousels
  haha[0].src = urls[0].url
  haha[1].src = urls[1].url
  haha[2].src = urls[2].url
  haha[3].src = urls[3].url
  haha[4].src = urls[4].url
  haha[5].src = urls[5].url
  haha[6].src = urls[6].url
  haha[7].src = urls[7].url
  haha[8].src = urls[8].url
})